package unittest.docsync;

import docsync.ExtensionMapper;
import docsync.FileInterface;

import docsync.GoogleFolder;
import docsync.doclist.DocListRequest;

public class UnitTestDocListRequest {

	/**
	 * @param args
	 */
	public static void main(String[] args) throws Exception {

		DocListRequest doclistreq = new DocListRequest("207project@gmail.com",
				"207group04");

		GoogleFolder folder = new GoogleFolder(new ExtensionMapper(),
				doclistreq);
	
		FileInterface[] files = folder.getFiles();

		for (FileInterface f : files) {
			System.out.println(f.getFilename());
			System.out.println(f.getIdentifier());
			System.out.println();
		}

		// folder.remove("document:13XQ41rVaQOlhpyGtT-ykuOR_W7YuZ_Bsuys6vYpnepA");
		// GoogleFile f = (GoogleFile)
		// folder.open("document:13XQ41rVaQOlhpyGtT-ykuOR_W7YuZ_Bsuys6vYpnepA");
		// File from = new File( "what.doc");
		// f.write( new FileInputStream(from), from.length() );
		// FileInterface to = folder.create("what.doc");
		// File from = new File( "what.doc");
		//		
		// InputStream is = new FileInputStream(from);
		// to.write( is, from.length() );

	}

}
